/* 泛型 */
struct Point<T> {
    x: T,
    y: T,
}

impl<T> Point<T> {
    pub fn get_x(&self) -> &T {
        &self.x
    }
}
impl Point<i32> {
    pub fn get_i32_x(&self) -> i32 {
        return self.x;
    }
}

enum Result<T, E> {
    Ok(T),
    Err(E),
}

#[test]
pub fn genericity_demo() {
    let s = Point { x: 3.4, y: 2.3 };
    println!("{},{}", s.x, s.y);
}
